﻿@model IEnumerable<VedranKrizicPortfolio.Models.Article>
@using VedranKrizicPortfolio.Helpers

<section class="PortfolioListSection">
    <h2 style="display: none;">Portfolio List</h2>
    @foreach (var item in Model)
    {
        <article class="PortfolioListArticle">
            @if (item.CoverIMG != null) 
            {
                <div class="PortfolioListArticleImage">
                    <img src="@Url.Content(item.CoverIMG)" alt="@item.Title"/>
                </div>
            }
            <div class="portfolioListArticleItem">
                <div class="portfoluoListItemHeader">
                    <h3>@item.Title</h3>
                </div>
                <div class="portfolioListItemBody">
                    @Html.Raw(Html.ReduceArticle(@item.Text, 300))
                </div>
                <div style="clear: both;">
                @Ajax.ActionLink("PORTFOLIO", "Index", "Portfolio", new AjaxOptions() { HttpMethod = "Get", UpdateTargetId = "Content", LoadingElementId = "loader"})
                    @Ajax.ActionLink("Read More", "Details", "Portfolio", null, null, @item.wfTitle, new { id = item.wfTitle.ToString() }, new AjaxOptions() { HttpMethod = "Get", UpdateTargetId = "Content", LoadingElementId = "loader" }, null)
                </div>
            </div>
        </article>
    }
</section>
